import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "Professors")
public class Professor {
	@Id
	@Column(name= "user_id")
	private Integer user_id;
	
	@Column(name= "first_name")
	private String prof_first_name;
	
	@Column(name= "last_name")
	private String prof_last_name;
	
	@Column(name= "birthday")
	private Date birthday;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "univ_id")
	private University univer;
	
	@Column(name="note")
	private String note;
		
	//getters
	
	public Integer getId(){return this.user_id;}
	
	public String getFirst_name(){return this.prof_first_name;}
	
	public String getLast_name(){return this.prof_last_name;}
	
	public Date getBirthday(){return this.birthday;}
	
	public University getUniversity(){return this.univer;}
	
	public String getNote(){return this.note;}
	
	//setters
	
	public void setId(Integer id){this.user_id=id;}
	
	public void setFirst_name(String first_name){this.prof_first_name=first_name;}
	
	public void setLast_name(String last_name){this.prof_last_name=last_name;}
	
	public void setBirthday(Date birthday){this.birthday=birthday;}
	
	public void setUniversity(University univer){this.univer=univer;}
	
	public void setNote(String note){this.note=note;}
}
